package org.jsola.contract.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.contract.constant.AccountType;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;

import javax.validation.constraints.NotNull;

import static org.jsola.contract.example.SealPositionExample.E_ACCOUNT_TYPE;
import static org.jsola.contract.example.SealPositionExample.E_APPENDIX_ID;
import static org.jsola.contract.example.SealPositionExample.E_SEAL_PAGE;
import static org.jsola.contract.example.SealPositionExample.E_SEAL_POSITION_X;
import static org.jsola.contract.example.SealPositionExample.E_SEAL_POSITION_Y;
import static org.jsola.contract.example.SealPositionExample.E_TEMPLATE_ID;
import static org.jsola.contract.example.SealPositionExample.E_TYPE;
import static org.jsola.contract.example.SealPositionExample.M_ACCOUNT_TYPE_ENUM_NOT_MATCH;
import static org.jsola.contract.example.SealPositionExample.M_SEAL_POSITION_X_MAX;
import static org.jsola.contract.example.SealPositionExample.M_SEAL_POSITION_Y_MAX;
import static org.jsola.contract.example.SealPositionExample.N_ACCOUNT_TYPE;
import static org.jsola.contract.example.SealPositionExample.N_APPENDIX_ID;
import static org.jsola.contract.example.SealPositionExample.N_SEAL_PAGE;
import static org.jsola.contract.example.SealPositionExample.N_SEAL_POSITION_X;
import static org.jsola.contract.example.SealPositionExample.N_SEAL_POSITION_Y;
import static org.jsola.contract.example.SealPositionExample.N_TEMPLATE_ID;
import static org.jsola.contract.example.SealPositionExample.N_TYPE;
import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;

/**
 * 合同默认签章位置
 *
 * @author JanusMix
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【合同默认签章位置】的参数")
@Data
public class SealPositionUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private Long id;

    @ApiModelProperty(notes = N_TEMPLATE_ID, example = E_TEMPLATE_ID)
    private Long templateId;

    @ApiModelProperty(notes = N_APPENDIX_ID, example = E_APPENDIX_ID)
    private Long appendixId;

    @ApiModelProperty(notes = N_ACCOUNT_TYPE, example = E_ACCOUNT_TYPE, allowableValues = AccountType.VALUES_STR)
    @Const(constClass = AccountType.class, message = M_ACCOUNT_TYPE_ENUM_NOT_MATCH)
    private Integer accountType;

    @ApiModelProperty(notes = N_TYPE, example = E_TYPE)
    private Integer type;

    @ApiModelProperty(notes = N_SEAL_PAGE, example = E_SEAL_PAGE)
    private Integer sealPage;

    @ApiModelProperty(notes = N_SEAL_POSITION_X, example = E_SEAL_POSITION_X)
    @Length(max = 32, message = M_SEAL_POSITION_X_MAX)
    private String sealPositionX;

    @ApiModelProperty(notes = N_SEAL_POSITION_Y, example = E_SEAL_POSITION_Y)
    @Length(max = 32, message = M_SEAL_POSITION_Y_MAX)
    private String sealPositionY;


}

